<?php
namespace app\api\model;


use app\model\Base;

class MerchantOrders extends Base
{
    public function getTypeFormatAttr($value, $data)
    {
        $str = "";
        switch ($data['pay_type']){
            case 'money':
                $str = Base::$moneyName . "付款";
                break;
            case 'wxpay':
                $str = "微信付款";
                break;
            case 'alipay':
                $str = "支付宝付款";
                break;
            case 'gold':
                $str = Base::$goldName . "付款";
                break;
            case 'goumai_money':
                $str = Base::$goumaiMoneyName . "付款";
                break;
            case 'voucher':
                $str = Base::$voucherName . "付款";
                break;
            case 'shopping':
                $str = "购物积分付款";
                break;
        }
        return $str;
    }

    public function getClassAttr($value, $data)
    {
        $str = "";
        switch ($data['pay_type']){
            case 'money':
                $str = "icon-yue bg-255-210-81";
                break;
            case 'wxpay':
                $str = "icon-weixin bg-110-169-107";
                break;
            case 'alipay':
                $str = "icon-zhifubao bg-90-168-250";
                break;
            case 'gold':
                $str = "icon-jifen bg-linear-255-167-148";
                break;
            case 'goumai_money':
                $str = "icon-yue bg-255-210-81";
                break;
            case 'voucher':
                $str = "icon-zijinchizhangbuyuetiaozhang bg-255-225-188";
                break;
            case 'shopping':
                $str = "icon-zijinchizhangbuyuetiaozhang bg-255-225-188";
                break;
        }
        return $str;
    }
}